package org.zezs.sync.mongo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zezs.sync.mongo.config.es.EsUtil;
import org.zezs.sync.mongo.config.mongo.MongoUtil;

import java.util.concurrent.CountDownLatch;

public class Application {

    static Logger logger= LoggerFactory.getLogger(Application.class);

    static CountDownLatch countDownLatch = new CountDownLatch(1);

    public static void main(String[] args) {

        //配置文件初始化
        Constants.load();
        //初始化mongo连接
        MongoUtil.init();
        //初始化es连接
        EsUtil.init();
        //启动同步程序
        RunTimeUtil.initSync();

        try {
            Application.class.wait();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
